package com.fenxiangtech.mall.dto;

import java.util.List;
import java.util.Map;

/**
 * @author lixiang
 * @param <E>
 */
public class PageData<E> {

    private Integer pageIndex;

    private Integer pageSize;

    private Integer totalCount;

    /**
     * key:数据库排序字段名
     * value:页面grid表头文案
     * eg：{"update_time":"更新时间","stock_qty":"库存数量"}
     */
    private Map<String, String> sortByMap;

    private List<E> dataList;



    public PageData() {
    }

    public PageData(Integer pageIndex, Integer pageSize, Integer totalCount, List<E> dataList) {
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
        this.totalCount = totalCount;
        this.dataList = dataList;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Map<String, String> getSortByMap() {
        return sortByMap;
    }

    public void setSortByMap(Map<String, String> sortByMap) {
        this.sortByMap = sortByMap;
    }

    public List<E> getDataList() {
        return dataList;
    }

    public void setDataList(List<E> dataList) {
        this.dataList = dataList;
    }


}
